package com.ohuang.baseapp.utils;


import ohos.agp.window.dialog.ToastDialog;
import ohos.app.Context;

public class ToastUtils {
    public static void showToastDialog(Context context,String msg, int duration) {
        if (msg.isEmpty() || duration <= 0) {
            return;
        }
       new ToastDialog(context).setDuration(duration)
                .setText(msg)
                .show();
    }


    public static void showToastDialog(Context context,String msg) {
        showToastDialog(context, msg,2000);
    }
}
